<section class="content-header">
	<h1>
		{{title}}<small></small>
	</h1>
</section>
<section class="content">
	<div class="box box-default">
		<div class="col-md-12">
			<div class="box-body" ng-controller="posts as fb">
				<alertdanger></alertdanger>
				<alertsuccess></alertsuccess>
				<form role="form">
					<!-- 添加信息 -->
					<div class="box-body" ng-show="add.show">
						<div class="form-group">
							<label>标题</label> <input maxlength="45" required="required"
								ng-model="poststitle" class="form-control" type="text"
								placeholder="请输入标题" value="">
						</div>
						<div class="form-group">
							<label>内容</label> <input maxlength="500" required="required"
								ng-model="content" class="form-control" type="text"
								placeholder="请输入内容" value="">
						</div>
						<div class="form-group">
							<label>图片</label>
							<div ngf-drop ngf-select ng-model="files" class="drop-box"
								ngf-drag-over-class="'dragover'" ngf-multiple="true"
								ngf-allow-dir="true" accept="image/*" ngf-pattern="'image/*'">
								<button class="btn btn-default btn-block btn-sm">选择文件</button>
								<div ngf-no-file-drop>File Drag/Drop is not supported for
									this browser</div>
							</div>
							<div class='box-body'>
								<div class="progress progress-sm active">
									<div
										class="progress-bar progress-bar-success progress-bar-striped"
										role="progressbar" aria-valuenow="0" aria-valuemin="0"
										aria-valuemax="100" style="width: {{progress}}%">
										<span class="sr-only">20% Complete</span>
									</div>
								</div>
								<div ng-repeat="img in allupimgs">
									<div ng-if="img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="remove($index)" type="button" class="close"
												data-dismiss="alert" aria-hidden="true">&times;</button>
											
											<img class="img-responsive pad"
												ng-src="{{img.normalfilepath}}" alt="Photo"> <img
												class="img-responsive pad" ng-src="{{img.compressfilepath}}"
												alt="Photo">

										</div>
									</div>
									<div ng-if="!img.isCloudImg">
										<div class="alert alert-success alert-dismissable">
											<button ng-click="remove($index)" type="button" class="close"
												data-dismiss="alert" aria-hidden="true">&times;</button>
											
											<img class="img-responsive pad"
												ng-src="{{img.basepath+img.normalfilepath}}" alt="Photo">

											<img class="img-responsive pad"
												ng-src="{{img.basepath+img.compressfilepath}}" alt="Photo">

										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<!-- 查看信息 -->
					<div class="box box-widget" ng-show="select.show">
						<div class="form-group">
							<label> <input type="radio" ng-model="status"
								ng-value="1" class="flat-red" ng-checked="true"> 启用
							</label> <label> <input type="radio" ng-model="status"
								ng-value="0" class="flat-red"> 禁用
							</label>

						</div>
						<div class='box-header with-border'>
							<div class='user-block'>
								<img class='img-circle' ng-src="{{headpath}}" alt='user image'>
								<span class='username'>{{loginname}}</span> <span
									class='description'>{{createtime | date:'yyyy-MM-dd
									HH:mm:ss'}}</span>
							</div>
						</div>
						<div class='box-body'>
							<h3>{{poststitle1}}</h3>
							<p>{{content}}</p>
							<img class="img-responsive pad" ng-src="{{bigimageurl}}"
								alt="Photo">
							<div ng-init="findPostsZanRecord();">
								<button class='btn btn-default btn-xs' ng-click="addlike();" ng-show="like.show">
									<i class='fa fa-thumbs-o-up'></i> Like
								</button>
								<button class='btn btn-default btn-xs' ng-click="donotlike();" ng-show="donotlike.show">
									<i class='fa fa-thumbs-o-up'></i>Don't like
								</button>
								<button class='btn btn-default btn-xs' ng-click="comment();">
									<i class='fa fa-thumbs-o-up'></i> Comment
								</button>
							</div>
							<span class='pull-right text-muted'>{{zannum}} likes -
								{{replynum}} comments</span>
						</div>
						<div class='box-footer box-comments' ng-show="savereply.show">
							<div class="form-group">
								<label>回复内容</label> <input maxlength="500" required="required"
									ng-model="replycontent" class="form-control" type="text"
									placeholder="请输入回复内容" value="">

							</div>
							<div class="form-group">
								<button type="button" class="btn btn-primary"
									ng-click="addreply();">提交</button>
								<button type="button" class="btn btn-primary"
									ng-click="cancelcomment();">取消</button>
							</div>
						</div>
						<div class='box-footer box-comments'
							ng-init="findAllPostsReply();">
							<div class='box-comment' ng-repeat="pr in postsreplylist">
								<img class='img-circle img-sm' src="{{pr.headpath}}"
									alt='user image'>
								<div class='comment-text'>
									<span class="username"> {{pr.loginname}} <span
										class='text-muted pull-right'>{{pr.createtime |
											date:'yyyy-MM-dd HH:mm:ss'}}</span>
									</span> {{pr.replycontent}}
								</div>
								<div class='comment-text'>
									<button class='btn btn-default btn-xs'
										ng-click="replycomment();">
										<i class='fa fa-thumbs-o-up'></i> Comment
									</button>
								</div>
								<div class='box-footer box-comments'
									ng-show="savereplyother.show">
									<div class="form-group">
										<label>回复内容</label> <input maxlength="500" required="required"
											ng-model="replycontent" class="form-control" type="text"
											placeholder="请输入回复内容" value="">

									</div>
									<div class="form-group">
										<button type="button" class="btn btn-primary"
											ng-click="addreply();">提交</button>
										<button type="button" class="btn btn-primary"
											ng-click="replycancelcomment();">取消</button>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-sm-7"></div>
							<div class="col-sm-5">
								<!-- <ul class="pagination" ng-show="totalPage>1"> -->
								<ul class="pagination" ng-show="totalPage>0">
									<li ng-class="{true:'active'}[currentPage==1]"><a
										href="javascript:void(0)" ng-click="currentPage=1;load()">首页</a></li>
									<li ng-class="{true:'disabled'}[currentPage==1]"><a
										href="javascript:void(0);" ng-click="prev()">上一页</a></li>
									<li ng-class="{true:'disabled'}[currentPage==totalPage]"><a
										href="javascript:void(0);" ng-click="next()">下一页</a></li>
									<li ng-class="{true:'active'}[currentPage==totalPage]"><a
										href="javascript:void(0)"
										ng-click="currentPage=totalPage;last()">末页</a></li>
									<li><a href="javascript:void(0)">&nbsp;&nbsp;&nbsp;页码{{currentPage}}/{{totalPage}}，共{{recordsTotal}}条数据&nbsp;&nbsp;&nbsp;</a></li>
								</ul>
							</div>

						</div>
					</div>
					<div class="box-footer">
						<button ng-show="savebtn.show" type="button"
							class="btn btn-primary" ng-click="save();">保存</button>
						<button ng-show="updatebtn.show" type="button"
							class="btn btn-primary" ng-click="update();">更新</button>
					</div>
				</form>
			</div>
		</div>
		<div class="box-footer"></div>
	</div>
</section>